// pages/help/help.js
const app = getApp()

const date = new Date()
const years = []
const months = []
const days = []

for (let i = 1990; i <= date.getFullYear(); i++) {
  years.push(i)
}

for (let i = 1; i <= 12; i++) {
  months.push(i)
}

for (let i = 1; i <= 31; i++) {
  days.push(i)
}

Page({

  /**
   * 页面的初始数据
   */
  data: {
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },

  onClick(e) {
    console.log('on click -----')
    wx.navigateTo({
      url: '../editor/edit_person_log?article=1'
    })
  },

  onClickArticle(e) {
    wx.navigateTo({
      url: '../editor/person_log_list'
    })
  },

  onClickArticleSee(e) {
    wx.navigateTo({
      url: '../editor/person_log_show'
    })
  },

  onClickTextArea(e) {
    app.navigateToTextAreaPage('初始数据111', function(text) {
      console.log('rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr', text)

    })
  },

  onClickSelectPerson(e) {
    app.navigateToOtherFamilyMember(-1, selectPersonId => {
      console.log('select person111:', selectPersonId)
    })
  },

  onClickSelectPersonRelation(e) {
    wx.navigateTo({
      url: '../relation/relation_edit_person'
    })
  }
})